home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Golf Digest's Best Places to Play
/
Golf Digest's Best Places to Play.iso
/
diamond
/
dbrs_ibm.dir
/
00024_Script_SalaryScript
< prev
next >
Wrap
Text File
|
1995-05-15
|
4KB
|
122 lines
on exitFrame
go to marker(0)+3
end
on mouseDown
set ButtonNum=the clickOn
if ButtonNum>0 then
set ButtonName=the name of cast (the castNum of sprite ButtonNum)
if (ButtonNum > 3) and (ButtonNum < 14) then
AddDigit(ButtonNum)
end if
if ButtonNum = 2 then
ClearDigit
end if
if ButtonNum = 3 then
CrunchIt
end if
if chars(ButtonName,1,6) = "ToMain" then
if PressBtn(ButtonNum) then
showCode
AllPuppetsOff
updateStage
go to "Jeweler"
end if
end if
if chars(ButtonName,1,4) = "Help" then
if PressBtn(ButtonNum) then
showHelp
puppetsprite ButtonNum, true
set the castNum of sprite ButtonNum to the number of cast (ButtonName)
puppetsprite ButtonNum, false
end if
end if
end if
end mouseDown
on AddDigit ButtonNum
if the castNum of sprite 21 <> the number of cast ("SalDigitEmpty") then
ClearDigit
end if
put ButtonNum-3 into theDigit
if theDigit=10 then put 0 into theDigit
set the castNum of sprite ButtonNum to the number of cast ("SalKey" & theDigit & "Down")
updateStage
repeat with i=19 down to 14
puppetsprite ButtonNum, true
put the castNum of sprite i into tempCastNum
set the castNum of sprite i+1 to tempCastNum
end repeat
set the castNum of sprite 14 to the number of cast ("SalDigit" & theDigit)
set the castNum of sprite ButtonNum to the number of cast ("SalKey" & theDigit)
end AddDigit
on ClearDigit
set the castNum of sprite 2 to the number of cast ("SalKeyClearDown")
updateStage
repeat with i=14 to 27
set the castNum of sprite i to the number of cast ("SalDigitEmpty")
end repeat
set the castNum of sprite 2 to the number of cast ("SalKeyClear")
end ClearDigit
on CrunchIt
set the castNum of sprite 3 to the number of cast ("SalKeyEnterDown")
updateStage
put empty into Salary
repeat with i=20 down to 14
put the castNum of sprite i into tempDigit
if tempDigit=the number of cast ("SalDigitEmpty") then
put empty after Salary
else
put the last char of (the name of cast (tempDigit)) after Salary
end if
end repeat
put value(Salary) into Salary
put Salary/6 into PayThis
put string(integer(PayThis)) into PayThis
repeat with i= 1 to length(PayThis)
put random(10)-1 into theDigit
set the castNum of sprite 21+length(PayThis)-i to the number of cast ("SalDigit" & theDigit)
updateStage
end repeat
startTimer
repeat while the timer < 3*60
put random(length(PayThis)) into theSprite
put random(10)-1 into theDigit
set the castNum of sprite 21+length(PayThis)-theSprite to the number of cast ("SalDigit" & theDigit)
updateStage
end repeat
repeat with i= 1 to length(PayThis)
put value(chars(PayThis,i,i)) into theDigit
set the castNum of sprite 21+length(PayThis)-i to the number of cast ("SalDigit" & theDigit)
updateStage
end repeat
set the castNum of sprite 3 to the number of cast ("SalKeyEnter")
end CrunchIt
on showCode
puppetsound "FirstCutYeahSound"
puppetsprite 40, true
set the castNum of sprite 40 to the number of cast ("Code1")
updateStage
repeat while soundbusy(1)
nothing
end repeat
set the castNum of sprite 40 to the number of cast ("HelpDot")
puppetsprite 40, false
end showCode
on showHelp
puppetsprite 40, true
set the castNum of sprite 40 to the number of cast ("HelpText")
updateStage
startTimer
repeat while the timer < 3*60
nothing
end repeat
set the castNum of sprite 40 to the number of cast ("HelpDot")
puppetsprite 40, false
end